set notimeout
set timeoutlen=50

if !g:mobile
    augroup InsertChords
        autocmd!
        autocmd InsertEnter * set timeout
        autocmd InsertLeave * set notimeout
        autocmd CmdLineEnter * let g:saved_timeout = &timeout | set timeout
        autocmd CmdLineLeave * let &timeout = g:saved_timeout
    augroup END

    inoremap jk <esc>
    inoremap kj <esc>
    cnoremap jk <c-c>
    cnoremap kj <c-c>
    inoremap kl <c-n>
    inoremap lk <c-n>
    noremap! jl <lf>
    noremap! lj <lf>
    noremap! df <bs>
    noremap! fd <bs>
    noremap! qe “”<left>
    noremap! eq “”<left>
    noremap! qc „“<left>
    noremap! cq „“<left>
endif
